﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace AsteroidWar
{
    public class Enemy : Hostile
    {
        public Vector2 gunOffset= new Vector2(25,10);      
        private static float enemyShipSpeed = 160f;

        public Enemy(
            Texture2D texture,
            Rectangle initialFrame,
            Vector2 location,
            int frameCounts)
            : base(texture, initialFrame, location, frameCounts, 15, enemyShipSpeed)
        { }

        public override bool IsActive()
        {
            if (Destroyed)
            {
                return false;
            }

            if (wayPoints.Count > 0)
            {
                return true;
            }

            if (WayPointReach())
            {
                return false;
            }

            return true;
        }

        public override void Draw(SpriteBatch spriteBatch)
        {
            if (IsActive())
            {
                sprite.Draw(spriteBatch,1.0f);
            }
        }
    }
}
